<?php

namespace Syrius\Query;

/**
 * Enter description here ...
 * @package	Query
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */ class Delete extends Query {
	private $_tblName;

	/**
	 * Ritorna la versione stringa dell'oggetto che �stato creato
	 */
	public function __toString() {
		for ($i = 0; $i < count($this->_whereConditions); $i++) {
			foreach ($this->_whereConditions [$i] as $k => $v) {
				$where [] = $k . " = '" . $v . "'";
			}
		}
		return "DELETE FROM " . $this->_tblName . "  WHERE " . implode(",", $where);
	}

	public function __construct($tbl_name) {
		$this->_tblName = $tbl_name;
	}

}

?>
